<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="{ADMIN_THEME}images/reset.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}images/system.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}images/dialog.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}images/switchbox.css" rel="stylesheet" type="text/css" />
    <link href="{ADMIN_THEME}luos/css/style.min.css?v=4.1.0" rel="stylesheet"><link href="{ADMIN_THEME}images/table_form.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{ADMIN_THEME}js/jquery.min.js"></script>
    <script type="text/javascript" src="{ADMIN_THEME}js/dialog.js"></script>
    <link rel="stylesheet" href="{ADMIN_THEME}js/layui/css/layui.css">
    <script src="{ADMIN_THEME}js/layui/lay/dest/layui.all.js"></script>
    <script type="text/javascript">
        var sitepath = '{SITE_PATH}{ENTRY_SCRIPT_NAME}';
        var finecms_admin_document = "{$cats[$data['catid']]['setting']['document']}";
    </script>
    <script type="text/javascript" src="{LANG_PATH}lang.js"></script>
    <script type="text/javascript" src="{ADMIN_THEME}js/core.js"></script>
    <script type="text/javascript">
        function ajaxletter() {
            var letter = $('#letter').val();
            if (letter == '') {
                $.post(sitepath+'?c=api&a=pinyin&id='+Math.random(), { name:$('#name').val() }, function(data){ $('#letter').val(data); });
            }
        }
    </script>
    <script type="text/javascript">
        $(function() {
            dr_set_type('{$data["type"]}');
        });

        function dr_set_type(v) {
            $(".dr_hide").hide();
            $(".dr_"+v).show();
        }
    </script>
    <title>admin</title>
</head>
<body style="font-weight: normal;">
<div class="subnav">
    <div class="content-menu ib-a line-x">
        <div class="layui-btn-group">
            <a class="layui-btn" href="{url('admin/wx/index')}" ><em>素材列表</em></a><span>|</span>
            <a class="layui-btn" href="{url('admin/wx/addResource')}"><em>添加单图文素材</em></a>
            <a class="layui-btn" href="javascript:" class="on"><em>添加/修改多图文素材</em></a>
        </div>
    </div>
    <div class="bk10"></div>
    <div class="table-list">
        <form action="" method="post">
           
            <input name="morepic_id" type="hidden" value="{$id}">
            <div class="col-tab" style="">
 <ul class="tabBut cu-li">
<li id="tab_setting_1" class="on" onclick="SwapTab('setting','on','',8,1);">文章1</li>
<li id="tab_setting_2" class="" onclick="SwapTab('setting','on','',8,2);">文章2</li>
<li id="tab_setting_3" class="" onclick="SwapTab('setting','on','',8,3);">文章3</li>
<li id="tab_setting_4" class="" onclick="SwapTab('setting','on','',8,4);">文章4</li>
<li id="tab_setting_5" class="" onclick="SwapTab('setting','on','',8,5);">文章5</li>
<li id="tab_setting_6" class="" onclick="SwapTab('setting','on','',8,6);">文章6</li>
<li id="tab_setting_7" class="" onclick="SwapTab('setting','on','',8,7);">文章7</li>
<li id="tab_setting_8" class="" onclick="SwapTab('setting','on','',8,8);">文章8</li>
</ul>

{php for($k=1;$k<9;$k++):}
	{php $str = "data".$k;$data = $$str;}
<input name="data{$k}[id]" type="hidden" value="{$data['id']}">
          <div id="div_setting_{$k}" class="contentList pad-10" {if $k<2}style="display: block;"{else}style="display: none;"{/if}>
       
          <table width="100%" class="table_form">

                <tr>
                    <th width="200">*标题： </th>
                    <td>
                        <input class="input-text" type="text" name="data{$k}[title]" value="{$data['title']}" id="name" size="30"/>
                    </td>
                </tr>
                <tr>
                    <th>缩略图：</th>
                    <td><input type="text" class="input-text" size="50" value="{$data[thumb]}" name="data{$k}[thumb]" id="thumb{$k}" />
                        <input type="button" style="width:66px;cursor:pointer;" class="btn btn-success btn-sm" onClick="preview('thumb{$k}')" value="预览" />
                        <input type="button" style="width:66px;cursor:pointer;" class="btn btn-success btn-sm" onClick="uploadImage('thumb{$k}','360','200')" value="上传" />
                        <div class="onShow">可直接输入图片完整的URL地址</div></td>
                </tr>


                <tr>
                    <th width="200">
                        *正文：
                    </th>
                    <td>
                        {php App::auto_load('fields');echo content_editor('content'.$k,array(0=> $data['content']), array('system'=>1,'pagebreak'=>1,'type' =>2,'height'=>'200'));}
                    </td>
                </tr>
                <tr>
                    <th width="200">
                        外部地址：
                    </th>
                    <td>
                        <input  class="input-text" type="text" name="data{$k}[url]" value="{$data['url']}" size="80">
                    </td>
                </tr>
               
            </table>
            </div>
           {php endfor;}
    
            </div>
            <div class="bk15"></div>
<input class="btn btn-success btn-sm" type="submit" name="submit" value="提交">
        </form>
    </div>
</div>
<script>
	function SwapTab(name,cls_show,cls_hide,cnt,cur){
	for(i=1;i<=cnt;i++){
		if(i==cur){
			$('#div_'+name+'_'+i).show();
			$('#tab_'+name+'_'+i).attr('class',cls_show);
		}else{
			$('#div_'+name+'_'+i).hide();
			$('#tab_'+name+'_'+i).attr('class',cls_hide);
		}
	}
}
	
</script>
</body>
</html>